{include file="common/head"/}
<div class="admin-main layui-anim layui-anim-upbit" ng-app="hd" ng-controller="ctrl">

    <form class="layui-form layui-form-pane">

        <div class="layui-form-item">
            <label class="layui-form-label">行业类别</label>
            <div class="layui-input-4">
                <input type="text" id="hy_name" name="hy_name" lay-verify="required" placeholder="请输入行业类别名称" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn"  lay-submit="" lay-filter="submit">提交保存</button>

            </div>
        </div>
    </form>
</div>
{include file="common/foot"/}

<script>


        layui.use(['form', 'layer'], function () {
            var form = layui.form, layer = layui.layer,$= layui.jquery;


            //监听提交
            form.on('submit(submit)', function(data){

              /*  layer.alert(JSON.stringify(data.field), {
                    title: '最终的提交信息'
                })
                return false;*/

                $.post("{:url('Client/hangyeAdd')}",data.field,function (res) {


                    if (res.code == 0){
                        layer.msg(res.msg,{time:2000});
                        layer.close(layer.index);
                        window.parent.location.reload();
                    }else {
                        layer.msg(res.msg,{time:2000});
                    }

                },'json')

                return false;
            });
        });
</script>
</body>
</html>